#!/usr/bin/env python2
# vim:fileencoding=utf-8

from __future__ import absolute_import, division, print_function, unicode_literals

from calibre.web.feeds.news import BasicNewsRecipe


class IdPixel(BasicNewsRecipe):
    title = '\u0418\u0434\u0435\u0430\u043B\u044C\u043D\u044B\u0439 \u043F\u0438\u043A\u0441\u0435\u043B\u044C'
    cover_url = u'https://idpixel.ru/i/logo2x.png'
    description = '\u041D\u043E\u0432\u043E\u0441\u0442\u043D\u043E\u0439 \u043F\u0440\u043E\u0435\u043A\u0442 \u043E \u0440\u0435\u0442\u0440\u043E-\u0438\u0433\u0440\u0430\u0445 \u0438 \u0440\u0435\u0442\u0440\u043E-\u0442\u0435\u0445\u043D\u0438\u043A\u0435. \u0412\u043E\u0441\u044C\u043C\u0438\u0431\u0438\u0442\u043D\u044B\u0435 \u0438\u0433\u0440\u044B, \u0448\u0435\u0441\u0442\u043D\u0430\u0434\u0446\u0430\u0442\u0438\u0431\u0438\u0442\u043D\u044B\u0435 \u043A\u043E\u043D\u0441\u043E\u043B\u0438, \u0434\u043E\u043C\u0430\u0448\u043D\u0438\u0435 \u043A\u043E\u043C\u043F\u044C\u044E\u0442\u0435\u0440\u044B \u0441 \u0438\u0433\u0440\u0430\u043C\u0438 \u043D\u0430 \u043A\u0430\u0441\u0441\u0435\u0442\u0430\u0445 \u0438 \u0442\u0430\u043A \u0434\u0430\u043B\u0435\u0435. \u041C\u044B \u0438\u0449\u0435\u043C \u0440\u0435\u0442\u0440\u043E-\u043D\u043E\u0432\u043E\u0441\u0442\u0438 \u043F\u043E \u0432\u0441\u0435\u043C\u0443 \u0441\u0432\u0435\u0442\u0443 \u0438 \u0434\u043E\u043D\u043E\u0441\u0438\u043C \u0438\u0445 \u0434\u043E \u0432\u0430\u0441.'  # noqa: E501
    publisher = '\u041C\u0438\u0445\u0430\u0438\u043B \u0421\u0443\u0434\u0430\u043A\u043E\u0432'
    category = 'news'
    __author__ = 'bugmen00t'
    language = 'ru'
    no_stylesheets = False
    remove_javascript = True
    auto_cleanup = True
    oldest_article = 100
    max_articles_per_feed = 50

    remove_tags_before = dict(name='div', attrs={'class': 'blog-post'})
    remove_tags_after = dict(
        name='div', attrs={'style': 'margin: 20px 0 0 2px;font-size: 16px;'}
    )
    remove_tags = [
        dict(
            name='div', attrs={'class': ' likely__widget likely__widget_vkontakte'}
        ),
        dict(name='div', attrs={'class': ' likely__widget likely__widget_twitter'}),
        dict(name='div', attrs={'class': ' likely__widget likely__widget_facebook'}),
        dict(name='div', attrs={'class': ' likely__widget likely__widget_telegram'}),
        dict(
            name='div',
            attrs={'class': ' likely__widget likely__widget_odnoklassniki'}
        ),
        dict(name='div', attrs={'class': 'comments_input_disabled'}),
        dict(name='div', attrs={'id': 'comments'})
    ]

    feeds = [(
        u'\u041D\u043E\u0432\u043E\u0441\u0442\u0438',
        u'https://idpixel.ru/rss/news.rss'
    )]
